import React, { Component } from 'react';

const simpleHoc = WrappedComponent => {
  console.log('simpleHoc');

  return class extends Component {
    constructor(props) {
      super(props)
      console.log('constructor');
    }

    render() {
      return (
        <div style={{background: 'darkblue', color: '#fff'}}>
          <p>Hello Hoc!</p>
          <WrappedComponent {...this.props} />
        </div>
      )
    }
  }
}

export default simpleHoc;